## --------------------------------------------------------------------------
#  Palm OS Generic Makefile for Palm OS Developer Suite v1.1.0
#
# Last edit: 11/5/04
#
# Fill in this file to specify your project and the source that you want
# to build, and the settings involved in the build. The makefile-engine.mk
# will then do the hard work of the makefile and dependency handling.
#
# After starting a new project, please remember the following steps...
#	1. Add all sources and resources in SOURCES and RESOURCES
#	2. Review the other settings as needed.
#
## --------------------------------------------------------------------------

SHELL = /bin/sh

## --------------------------------------------------------------------------
# Set up the artifact name, which is the root name of your project's output
# without the extension.
#
# The PRC and/or static library name and other file names 
# are based on the artifact name
## --------------------------------------------------------------------------

ARTIFACT_NAME =???ARTIFACT_NAME???

EMPTY =
SPACE =$(EMPTY) $(EMPTY)
ESCAPED_ARTIFACT_NAME = $(subst $(SPACE),\ ,$(ARTIFACT_NAME))
PRC_NAME = $(ESCAPED_ARTIFACT_NAME).prc

## --------------------------------------------------------------------------
# 68K Sources and Resources
# List all the sources (.c/.cpp) and resources (.xrd) in your project
# Use project relative path names with forward slashes (src/code.cpp).
# Please do not use spaces in directory names.
# A note about XRD resource files:  If you have existing .rsrc or .rcp files, 
# refer to the documentation for the GenerateXRD tool to convert them into 
# XRD files for use with all Palm OS SDKs.
## --------------------------------------------------------------------------

# TODO: Update all 68K sources and resources

SOURCES = ???SOURCES???
RESOURCES = ???RESOURCES???

## --------------------------------------------------------------------------
# PNO Sources
# Warning: To understand this section, you need to understand how PNO
# functions are called from a 68K program.  Please refer to
# http://www.palmos.com/dev/support/docs/os5arm/PalmOS5ARMTOC.html
# To generate the correct PNO objects for your project, make needs more
# than just a list of sources.  It also needs to know the binary resources
# that will be loaded by your program calling the PNO, and what objects
# go into each resource.  To specify everything required, please do 
# the following:
# 	1. 	Fill in PNO_SOURCES with a list of all PNO source files.
#	2.	Fill in PNO_RESOURCES with a list of the binary resources your 
#		program is going to load specified by type and id.  The normal
#		convention for PNO resources uses a type of ARMC and starts with 
#		an id of 1000 (hex). To specify this resource, use ARMC1000.
#		There is currently a 64k limit on the size of each resource.
#	3.	Add a definition for each resource.  The definition consists of
#		the list of objects that should be put into that resource.
#		(These definitions allow you to combine multiple source files 
#		into one resource.)  The format of the definition should be:
#		resource = object(s)
#	4.	Add three pieces of information for each ARM resource:
#			PNO_ENTRY = the name of the method accessible in the resource
#			MAIN_OBJ = the object file containing the PNO entry method
#			RSRC_ID = the hex id of the resource
#	5.	Fill in your desired name for the Palm OS Simulator library
#		for running your application in the simulator.
# Here is an example setup with three source files and two resources.
# One resource contains multiple objects.
#	PNO_SOURCES = Compress.c Calculate.cpp CalcUtils.cpp
#	PNO_RESOURCES = ARMC1000 ARMC1001
#	ARMC1000 = Compress.o
#	ARMC1000_PNO_ENTRY = NativeFunction
#	ARMC1000_MAIN_OBJ = Compress.o
#	ARMC1000_RSRC_ID = 0x1000
#	ARMC1001 = Calculate.o CalcUtils.o
#	ARMC1001_PNO_ENTRY = CalcFunction
#	ARMC1001_MAIN_OBJ = Calculate.o
#	ARMC1001_RSRC_ID = 0x1001
#	PNO_LIBRARY = $(ESCAPED_ARTIFACT_NAME).dll
## --------------------------------------------------------------------------

# TODO: List any PNO sources and binaries
#

PNO_SOURCES = ???PNO_SOURCES???
PNO_RESOURCES = ???PNO_RESOURCES???

ARMC1000 = ???ARMC1000???
ARMC1000_PNO_ENTRY = ???ARMC1000_PNO_ENTRY???
ARMC1000_MAIN_OBJ = ???ARMC1000_MAIN_OBJ???
ARMC1000_RSRC_ID = ???ARMC1000_RSRC_ID???

PNO_LIBRARY = $(ESCAPED_ARTIFACT_NAME).dll


## --------------------------------------------------------------------------
# Specify if this application has multiple sections
# If TRUE, then Sections.def file must be part of the project
## --------------------------------------------------------------------------

MULTIPLE_CODE_SECTIONS = FALSE

## --------------------------------------------------------------------------
# Review Database information
# Register Creator ID at: http://www.palmos.com/dev/creatorid 
## --------------------------------------------------------------------------

CREATOR_ID = ???CREATOR_ID???
DB_TYPE = ???DB_TYPE???

# to enable reset on install, use -r
DATABASE_RESET = ???DATABASE_RESET???
# to enable backup, use -b
DATABASE_BACKUP = ???DATABASE_BACKUP???
# to make the app hidden, use -h
DATABASE_HIDDEN = ???DATABASE_HIDDEN???
# to prevent copy, use -p
DATABASE_PROTECT = ???DATABASE_PROTECT???
# to bundle the application with its databases on beaming, use -dbFlagBundle
DATABASE_BUNDLE = ???DATABASE_BUNDLE???

DATABASE_VERSION = ???DATABASE_VERSION???

LOCALE = ???LOCALE???

ESCAPED_DATABASE_NAME = $(subst $(SPACE),\ ,???DB_NAME???)
DATABASE_NAME =$(ESCAPED_DATABASE_NAME) 

## --------------------------------------------------------------------------
# Build Settings
# Review the following for your needs.
# The default settings build with debug information and no optimization.
## --------------------------------------------------------------------------

#
# Set Debug or Release configuration here
#
DEBUG_OR_RELEASE=Debug

#
# Set the target platform for the build; either Device or Simulator
# Use Device as a target for emulator builds.  
# This setting affects whether a DLL is produced or not for application
# projects.  A DLL is needed for simulator builds and contains the PNO 
# code in native platform format (e.g. x86 on Windows systems). 
#
TARGET_PLATFORM=Simulator

# Specify the level of optimization that you want
# NONE, SOME, FULL
OPTIMIZE_LEVEL = ???OPTIMIZE_LEVEL???

# Specify warning level
# NONE = suppress all warnings
# ALL = enable all warnings
# <undefined> = default warnings
# For 68K compilations, set WARNING_LEVEL
# For simulator target compilation, set SIM_WARNING_LEVEL
WARNING_LEVEL = ???WARNING_LEVEL???
SIM_WARNING_LEVEL = ???SIM_WARNING_LEVEL???

# Specify warning level for PNO device target compilation
# NONE = suppress all warnings
# SOME = enable some warnings
# ALL = enable all warnings
# <undefined> = default warnings
PNO_WARNING_LEVEL = ???PNO_WARNING_LEVEL???

# Specify if warnings are treated as errors
# values: TRUE, FALSE
# for 68K builds, set WARNING_AS_ERROR
# for PNO device builds, set PNO_WARNING_AS_ERROR
# for PNO simulator builds, set SIM_WARNING_AS_ERROR
WARNING_AS_ERROR = ???WARNING_AS_ERROR???
PNO_WARNING_AS_ERROR = ???PNO_WARNING_AS_ERROR???
SIM_WARNING_AS_ERROR = ???SIM_WARNING_AS_ERROR???

# Specify verbose output
# TRUE, FALSE
# for 68K builds, set VERBOSE
# for PNO device builds, set PNO_VERBOSE
# for PNO simulator builds, set SIM_VERBOSE
VERBOSE = ???VERBOSE???
PNO_VERBOSE = ???PNO_VERBOSE???
SIM_VERBOSE = ???SIM_VERBOSE???

# Specify assertion support for PNO device builds
# TRUE, FALSE
ENABLE_ASSERTIONS = ???ENABLE_ASSERTIONS???


# Additional paths to look for #include "header"
# (Source file directories are automatically included)
# Please note that both local and system include paths should 
# either use "cygwin" syntax or if in Windows syntax the should
# be quoted; i.e. ../MyLibrary/headers or "C:\Source\MyLibrary\headers".
# Additionally, you must explicly specify the "-I" prior to each
# path included in this variable.  Spaces are used to separate
# each path from each other.
LOCAL_INCLUDE_PATHS = ???LOCAL_INCLUDE_PATHS???
LOCAL_PNO_INCLUDE_PATHS = ???PNO_LOCAL_INCLUDE_PATHS???
LOCAL_PNO_SIM_INCLUDE_PATHS = ???SIM_LOCAL_INCLUDE_PATHS???

# Additional paths to look for #include <header>
# (Palm OS SDK directories are automatically included)
# Additionally, you must explicly specify the "-I" prior to each
# path included in this variable.  Spaces are used to separate
# each path from each other.
SYSTEM_INCLUDE_PATHS = ???SYSTEM_INCLUDE_PATHS???
SYSTEM_PNO_INCLUDE_PATHS = ???PNO_SYSTEM_INCLUDE_PATHS???
SYSTEM_PNO_SIM_INCLUDE_PATHS = ???SIM_SYSTEM_INCLUDE_PATHS???
PRE_INCLUDE_PATHS = ???PRE_INCLUDE_PATHS???
PNO_PRE_INCLUDE_PATHS = ???PNO_PRE_INCLUDE_PATHS???
PNO_SIM_PRE_INCLUDE_PATHS = ???SIM_PRE_INCLUDE_PATHS???

# Specify any needed preprocessor symbols.
# If you set DEFINES to "ASSERTLEVEL=1", the compiler will see "-DASSERTLEVEL=1"
# (separate individual entries with spaces)
DEFINES = ???DEFINES???
PNO_DEFINES = ???PNO_DEFINES???
PNO_SIM_DEFINES = ???SIM_DEFINES???
UNDEFINES = ???UNDEFINES???
PNO_UNDEFINES = ???PNO_UNDEFINES???
PNO_SIM_UNDEFINES = ???SIM_UNDEFINES???

# Specify additional compiler flags for all files
ADDITIONAL_COMPILER_FLAGS = ???ADDITIONAL_COMPILER_FLAGS???
ADDITIONAL_PNO_COMPILER_FLAGS = ???ADDITIONAL_PNO_COMPILER_FLAGS??? -nologo
ADDITIONAL_PNO_SIM_COMPILER_FLAGS = ???ADDITIONAL_SIM_COMPILER_FLAGS???

# Specify additional linker flags
ADDITIONAL_LINKER_FLAGS = ???ADDITIONAL_LINKER_FLAGS???
ADDITIONAL_PNO_LINKER_FLAGS = ???ADDITIONAL_PNO_LINKER_FLAGS???
ADDITIONAL_PNO_SIM_LINKER_FLAGS = ???ADDITIONAL_SIM_LINKER_FLAGS???
ADDITIONAL_LINK_LIBRARIES = ???ADDITIONAL_LINK_LIBRARIES???
ADDITIONAL_PNO_LINK_LIBRARIES = ???ADDITIONAL_PNO_LINK_LIBRARIES???
ADDITIONAL_PNO_SIM_LINK_LIBRARIES = ???ADDITIONAL_SIM_LINK_LIBRARIES???
ADDITIONAL_LINK_LIBPATH = ???ADDITIONAL_LINK_LIBPATH???
ADDITIONAL_PNO_LINK_LIBPATH = ???ADDITIONAL_PNO_LINK_LIBPATH???
ADDITIONAL_PNO_SIM_LINK_LIBPATH = ???ADDITIONAL_PNO_SIM_LINK_LIBPATH???

# Tools Directory
# Normally you wouldn't want to override this since the necessary tools
# are in the PATH.  But if you experimenting with other tools, then 
# reset the directory here
# If overridden, end with a trailing '/'
TOOLS_DIR =


## --------------------------------------------------------------------------
# Resource Settings
## --------------------------------------------------------------------------

# Specify the target text encoding
# LATIN, JAPANESE, SIMPLIFIED_CHINESE
PRC_TEXT_ENCODING = ???PRC_TEXT_ENCODING???

# Specify resource locale checking
# TRUE, FALSE
PRC_NO_LOCALE_CHECK = ???PRC_NO_LOCALE_CHECK???

# Specify strict resource locale checking
# TRUE, FALSE
PRC_STRICT_LOCALE = ???PRC_STRICT_LOCALE???

# Specify if text encoding should be checked
# TRUE, FALSE
PRC_STRICT_ENCODING = ???PRC_STRICT_ENCODING???

# Specify overlay filter value
# BASE, OVERLAY, FULL, <default>
PRC_OVERLAY_FILTER = ???PRC_OVERLAY_FILTER???

# Specify no warning on resource size
# TRUE, FALSE
PRC_NO_WARN_SIZE = ???PRC_NO_WARN_SIZE???

# Specify quiet output or not (opposite of verbose)
# Use PRC_QUIET for PalmRC invocations
# Use PRCMERGE_QUIET for PRCMerge invocations
# TRUE, FALSE
PRC_QUIET = ???PRC_QUIET???
PRCMERGE_QUIET = ???PRCMERGE_QUIET???

# Additional flags for Resource compiler and linker
ADDITIONAL_PRC_FLAGS = ???ADDITIONAL_PRC_FLAGS??? ???PRC_INCLUDES???
ADDITIONAL_PRCMERGE_FLAGS = ???ADDITIONAL_PRCMERGE_FLAGS??? ???PRCMERGE_ONLY??? ???PRCMERGE_OMIT??? ???PRCMERGE_NT_SIM_RES???

## --------------------------------------------------------------------------
# Output Settings
## --------------------------------------------------------------------------

# Modify if you want object and output files to be in different locations
# (However, please note that all object directories must be different
# for the makefile engine to properly operate.)
# Initially, device and simulator builds go to the same output directories 
# because the 68K compilations steps and outputs are the same for both targets

DEBUG_DEVICE_OUTPUT_DIR := DebugDevice
RELEASE_DEVICE_OUTPUT_DIR := ReleaseDevice
DEBUG_SIMULATOR_OUTPUT_DIR := DebugSim
RELEASE_SIMULATOR_OUTPUT_DIR := ReleaseSim

# PNO code when targeting a device output directories
PNO_ARM_DEBUG_OUTPUT_DIR := DebugDevice/NativeCode
PNO_ARM_RELEASE_OUTPUT_DIR := ReleaseDevice/NativeCode
# PNO code when targeting a simulator output directories
PNO_SIM_DEBUG_OUTPUT_DIR := DebugSim/NativeCode
PNO_SIM_RELEASE_OUTPUT_DIR := ReleaseSim/NativeCode


## --------------------------------------------------------------------------
# Makefiles
## --------------------------------------------------------------------------

## conditionally include an auto-generated.mk for dynamic definitions
-include auto-generated.mk

## include the makefile engine
include makefile-engine.mk

## conditionally include your own custom.mk for your specific overrides or definitions
## this is useful if you don't want to use the auto-generated.mk values
## for some reason
-include custom.mk
